package com.cyf.db.mapper;

import com.cyf.db.bean.LocalParking;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import javax.swing.text.html.ListView;
import java.util.List;

/**
 * Created by cheyifu on 2018/2/6.
 */
public interface LocalParkingMapper {

    //根据车场id查找车场
    @Select("select * from local_parking where parkingId = #{parkingId}")
    List<LocalParking> getParkingById(@Param("parkingId") int parkingId);

    //统计车场车位数
    @Select("select SUM(carport) from local_parking where parkingId = #{parkingId};")
    Integer getCarPortSpace(@Param("parkingId") int parkingId);
}
